import Vue from 'vue'
import VueRouter from 'vue-router'
import Head from '../views/pc/Head.vue'

import Carpay from '../views/CarBike/Carpay.vue'
import Parking from '../views/CarBike/Parking.vue'
import Regional from '../views/CarBike/Regional.vue'
import Vehicle from '../views/CarBike/Vehicle.vue'
import Yueka from '../views/CarBike/Yueka.vue'
//报修记录
import RepairManagement from "../views/zwx/commercialService/Repair/RepairManagement";
//报修审核
import Audit from "../views/zwx/commercialService/Repair/Audit";
//访客记录
import visitor from "../views/zwx/commercialService/visitor/visitor";
//查看访客详情
import visitorFind from "../views/zwx/commercialService/visitor/visitorFind";
//投诉记录
import complaint from "../views/zwx/commercialService/complaint/complaint";
//查看投诉详情
import complaintFind from "../views/zwx/commercialService/complaint/complaintFind";
//公告 活动
import Activity from "../views/zwx/commercialService/Activity/Activity";
//添加修改 公告/活动
import ActivityUp from "../views/zwx/commercialService/Activity/ActivityUp";
import Approval from '../views/CarBike/Approval'
import Community from '../views/Building/Community.vue'
import addCommunity from '../views/Building/addCommunity'
import addPortal from '../views/Building/addPortal'
import Portal from '../views/Building/Portal.vue'
import Resident from '../views/Building/Resident.vue'
import ps from '../views/Building/ps.vue'
import addResident from '../views/Building/addResident.vue'
Vue.use(VueRouter)

const routes = [
  {
    // path: '/',
    // name: 'aaa',
    // // component: Login,
    // component: () => import(/* webpackChunkName: "about" */ '../views/aaa.vue')

    // path:'/',
    // name: 'Head',
    // component: Head
    path: '/',
    name: 'login',
    // component: Login,
    component: () => import(/* webpackChunkName: "about" */ '../views/wh/login.vue')

  },
  {
    path: '/Head',
    name: 'Head',
    component: Head,
    children:[{
      path:'/Regional',
      name:'Regional',
      component:Regional
    },{
      path:'/Carpay',
      name:'Carpay',
      component:Carpay
    },{
      path:'/Parking',
      name:'Parking',
      component:Parking
    },{
      path:'/Vehicle',
      name:'Vehicle',
      component:Vehicle
    },{
      path:'/Yueka',
      name:'Yueka',
      component:Yueka
    },{
      path:'/RepairManagement',
      name:'RepairManagement',
      component:RepairManagement
    },{
      path:'/Audit/:id',
      name:'Audit',
      component:Audit
    },{
      path:'/visitor',
      name:'visitor',
      component:visitor
    },{
      path:'/visitorFind/:id',
      name:'visitorFind',
      component:visitorFind
    },{
      path:'/complaint',
      name:'complaint',
      component:complaint
    },{
      path:'/complaintFind/:id',
      name:'complaintFind',
      component:complaintFind
    },{
      path:'/Activity',
      name:'Activity',
      component:Activity
    },{
      path:'/ActivityUp/:id',
      name:'ActivityUp',
      component:ActivityUp
    },
      {
        path: '/Regional',
        name: 'Regional',
        component: Regional
      }, {
        path: '/Carpay',
        name: 'Carpay',
        component: Carpay
      }, {
        path: '/Parking',
        name: 'Parking',
        component: Parking
      }, {
        path: '/Vehicle',
        name: 'Vehicle',
        component: Vehicle
      }, {
        path: '/Yueka',
        name: 'Yueka',
        component: Yueka
      }, {
        path: '/Approval',
        name: 'Approval',
        component: Approval
      },
      {
        path: '/workbench',
        name: 'workbench',
        // component: Login,
        component: () => import(/* webpackChunkName: "about" */ '../views/wh/workbench.vue')
      },{
        path:'/Community',
        name:'Community',
        component: Community
      }, {
        path: '/addCommunity',
        name: 'addCommunity',
        component: addCommunity
      },{
        path:'/Portal',
        name:'Portal',
        component: Portal
      }, {
        path: '/addPortal',
        name: 'addPortal',
        component: addPortal
      },{
          path: '/Resident',
          name: 'Resident',
          component: Resident
      }, {
          path: '/ps',
          name: 'ps',
          component: ps
      }, {
          path: '/addResident',
          name: 'addResident',
          component: addResident
      }
    ]
  },
  {
    path: '/register',
    name: 'register',
    // component: Login,
    component: () => import(/* webpackChunkName: "about" */ '../views/wh/register.vue')
  },
  {
    path: '/forgot',
    name: 'forgot',
    // component: Login,
    component: () => import(/* webpackChunkName: "about" */ '../views/wh/forgot.vue')
  },
  {
    path: '/community1',
    name: 'community',
    // component: Login,
    component: () => import(/* webpackChunkName: "about" */ '../views/wh/community.vue')
  },
  {
    path: '/addCommunity1',
    name: 'addCommunity',
    // component: Login,
    component: () => import(/* webpackChunkName: "about" */ '../views/wh/addCommunity.vue')
  },
  {
    path: '/updateCommunity1',
    name: 'updateCommunity',
    // component: Login,
    component: () => import(/* webpackChunkName: "about" */ '../views/wh/updateCommunity.vue')
  },
  
  {
    path: '/updateResident',
    name: 'updateResident',
    // component: Login,
    component: () => import(/* webpackChunkName: "about" */ '../views/wh/updateResident.vue')
  },
  {
    path: '/auditResident',
    name: 'auditResident',
    // component: Login,
    component: () => import(/* webpackChunkName: "about" */ '../views/wh/auditResident.vue')
  },
  {
    path: '/bill',
    name: 'bill',
    // component: Login,
    component: () => import(/* webpackChunkName: "about" */ '../views/wh/bill.vue')
  },
  {
    path: '/addBill',
    name: 'addBill',
    // component: Login,
    component: () => import(/* webpackChunkName: "about" */ '../views/wh/addBill.vue')
  },
  {
    path: '/updateBill',
    name: 'updateBill',
    // component: Login,
    component: () => import(/* webpackChunkName: "about" */ '../views/wh/updateBill.vue')
  },
  {
    path: '/test',
    name: 'test',
    // component: Login,
    component: () => import(/* webpackChunkName: "about" */ '../views/wh/test.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router
